package src.Base;

import java.util.ArrayList;

public class Symbol2 {
    int dim;
    int x;
    int y;
    String Addr = "i32";
    String intVal = "";
    ArrayList<String> dim1= new ArrayList<>();
    String [][] dim2 = null;

    public Symbol2(int dim){
        this.dim = dim;
    }

    public Symbol2(int dim, int x){
        this.x = x;
        this.dim = dim;
    }

    public Symbol2(int dim, int x, int y){
        this.x = x;
        this.y = y;
        this.dim = dim;
        if(x == 0){
            dim2 = new String[11111][y];
        }else {
            dim2 = new String[x][y];
        }
    }

    public void setAddr(String s){
        Addr = s;
    }

    public void setDim1(ArrayList<String> list) {
        dim1.addAll(list);
    }

    public ArrayList<String> getDim1() {
        return dim1;
    }
    public void setDim(int dim){
        this.dim = dim;
    }

    public void setDim2(String[][] dim2) {
        this.dim2 = dim2;
    }

    public String[][] getDim2() {
        return dim2;
    }

    public String getAddr(){
        return Addr;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public int getDim() {
        return dim;
    }

    public void setIntVal(String intVal) {
        this.intVal = intVal;
    }

    public String getIntVal() {
        return intVal;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
        if(x == 0){
            dim2 = new String[11111][y];
        }else {
            dim2 = new String[x][y];
        }
    }
}
